--- title: The peak pattern puzzle keywords: fastai sidebar: home_sidebar summary: "Matching peak patterns " description: "Matching peak patterns " nb_path: "notebooks/50_peak-pattern-puzzle.ipynb" ---
In the previous steps we have computed the hotmax spectra and within each spectrum detected peaks above the Poison noise level. All this preliminary work was needed to arrive at the central problem of MA-XRF analysis: solving the peak pattern puzzle. For each individual hotmax spectrum I would like to explain the presence of all peaks above the Poison noise level.
Before trying to assign peaks to the presence of specific elements in the scanned object, one should identify instrumental peaks that result from the physics of the instrument detector or Rhodium anode.
from maxrf4u import HotmaxAtlas
hma = HotmaxAtlas('RP-T-1898-A-3689.datastack')
hma.plot_spectra()
Now we can start to 'explain away' all peaks. For now, it is highly instructive to walk through all hotmax spectra and see which element patterns explain the peak patterns that we observe. To do so, import the plot_puzzle() and plot_ptrn() functions.
from maxrf4u import plot_puzzle, plot_ptrn
hma = HotmaxAtlas('RP-T-1898-A-3689.datastack')
n = 0
ax0, ax1 = plot_puzzle(hma, n)
# patterns
plot_ptrn('Ca', -1, ax1);
n = 1
ax0, ax1 = plot_puzzle(hma, n)
# patterns
plot_ptrn('O', -1, ax1);
plot_ptrn('Ca', -1, ax1);
n = 2
ax0, ax1 = plot_puzzle(hma, n)
# patterns
plot_ptrn('Pb', -1, ax1);
n = 3
ax0, ax1 = plot_puzzle(hma, n)
# patterns
plot_ptrn('Cl', -1, ax1);
plot_ptrn('Ca', -1, ax1);
plot_ptrn('Fe', -2, ax1);
n = 4
ax0, ax1 = plot_puzzle(hma, n)
# patterns
plot_ptrn('Fe', -3, ax1)
plot_ptrn('Ca', -1, ax1)
plot_ptrn('O', -1, ax1)
plot_ptrn('S', -1, ax1)
plot_ptrn('K', -2, ax1);
n = 5
ax0, ax1 = plot_puzzle(hma, n)
# patterns
plot_ptrn('Ca', -1, ax1);
n = 6
ax0, ax1 = plot_puzzle(hma, n)
# patterns
plot_ptrn('Ca', -1, ax1);
n = 7
ax0, ax1 = plot_puzzle(hma, n)
# patterns
plot_ptrn('Fe', -1, ax1);
plot_ptrn('Ti', -2, ax1);
plot_ptrn('Ca', -3, ax1);
n = 8
ax0, ax1 = plot_puzzle(hma, n)
# patterns
plot_ptrn('Fe', -3, ax1);
plot_ptrn('Ba', -1, ax1);
plot_ptrn('Ca', -2, ax1);
n = 9
ax0, ax1 = plot_puzzle(hma, n)
# patterns
plot_ptrn('Mn', -1, ax1);
plot_ptrn('Ca', -2, ax1);
plot_ptrn('Fe', -3, ax1);
n = 10
ax0, ax1 = plot_puzzle(hma, n)
# patterns
plot_ptrn('Fe', -1, ax1);
plot_ptrn('Ca', -2, ax1);
The tiny peak [6] in hotmax spectrum #10 is clearly the silicon detector escape peak located at 6.40 keV minus 1.74 keV.
n = 11
ax0, ax1 = plot_puzzle(hma, n)
# patterns
plot_ptrn('Fe', -1, ax1);
plot_ptrn('Ca', -2, ax1);
n = 12
ax0, ax1 = plot_puzzle(hma, n)
# patterns
plot_ptrn('Cu', -1, ax1);
plot_ptrn('Zn', -2, ax1);
plot_ptrn('Ca', -3, ax1);
n = 13
ax0, ax1 = plot_puzzle(hma, n)
# patterns
plot_ptrn('Cu', -1, ax1);
plot_ptrn('Zn', -2, ax1);
plot_ptrn('Ca', -3, ax1);
n = 14
ax0, ax1 = plot_puzzle(hma, n)
# patterns
plot_ptrn('Cu', -1, ax1);
plot_ptrn('Zn', -2, ax1);
plot_ptrn('Ca', -3, ax1);
n = 15
ax0, ax1 = plot_puzzle(hma, n)
# patterns
plot_ptrn('Pb', -1, ax1);
n = 16
ax0, ax1 = plot_puzzle(hma, n)
# patterns
plot_ptrn('Pb', -1, ax1);
n = 17
ax0, ax1 = plot_puzzle(hma, n)
# patterns
plot_ptrn('Ca', -1, ax1);
n = 18
ax0, ax1 = plot_puzzle(hma, n)
# patterns
plot_ptrn('Pb', -1, ax1);
n = 19
ax0, ax1 = plot_puzzle(hma, n)
# patterns
plot_ptrn('Ca', -1, ax1);
n = 20
ax0, ax1 = plot_puzzle(hma, n)
# patterns
plot_ptrn('Pb', -1, ax1);
Ok, that is it. Let's try to summarize what we have learned...